import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const GAME: AppRouteRecordRaw = {
  path: '/game',
  name: 'GameApp',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.game',
    requiresAuth: true,
    icon: 'icon-trophy',
    order: 100,
  },
  children: [
    {
      path: 'list',
      name: 'GameListApp',
      component: () => import('@/views/game/list/index.vue'),
      meta: {
        locale: 'menu.game.list',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'approve',
      name: 'GameApproveListApp',
      component: () => import('@/views/game/approve/index.vue'),
      meta: {
        locale: 'menu.game.approve',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'draft',
      name: 'GameDraftListApp',
      component: () => import('@/views/game/draft/index.vue'),
      meta: {
        locale: 'menu.game.draft',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'editor',
      name: 'GameEditorApp',
      component: () => import('@/views/game/editor/index.vue'),
      meta: {
        locale: 'menu.game.editor',
        requiresAuth: true,
        hideInMenu: true,
        roles: ['*'],
      },
    },
    {
      path: 'detail',
      name: 'GameDetailApp',
      component: () => import('@/views/game/detail/index.vue'),
      meta: {
        locale: 'menu.game.detail',
        requiresAuth: true,
        hideInMenu: true,
        roles: ['*'],
      },
    },
    {
      path: 'rule',
      name: 'GameRuleApp',
      component: () => import('@/views/game/rule/index.vue'),
      meta: {
        locale: 'menu.game.rule',
        requiresAuth: true,
        roles: ['*'],
      },
    },
  ],
};

export default GAME;
